package com.m3958.firstgwt.client.constants;

import com.google.gwt.core.client.JavaScriptObject;
import com.google.gwt.core.client.JsArrayString;

public class LocalMenuCatJso extends JavaScriptObject{
	
	protected LocalMenuCatJso(){}
	
	public final native JsArrayString getCatMenus(String key)/*-{return this[key];}-*/;
	
	public final native String getCatkey(String menuKey)/*-{
		var kl = this.catKeys.length;
		for(var i=0;i<kl;i++){
			var ma = this[this.catKeys[i]];
			for(var j=0;i<ma.length;j++){
				if(ma[j] == menuKey){
					return this.catKeys[i];
				}
			}
		}
		return null;
	}-*/;
}
